from weibopy.auth import OAuthHandler

class weiboAuth(object):
    def __init__(self,app_key='1213131446',app_secret='7ff94a0ab3ca33e3c55936412a2edf07'):
        self.App_key = app_key
        self.App_secret = app_secret
        self.auth_handler = None
        self.auth_url = None

    def get_sina_token(self):
        self.auth_handler = OAuthHandler(App_key, App_secret)
        self.auth_url = auth_handler.get_authorization_url()
        return self.auth_url

    def access_auth(verifier,auth_handler):
        self.auth_handler.get_access_token(verifier.strip())